package cn.csc.module.pay.controller.admin.order.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.util.Map;

@ApiModel(description = "app - 支付订单提交 Request VO")
@Data
public class PayOrderSubmitCommReqVO {

    @ApiModelProperty(value = "支付单主键", required = true, example = "1")
    //@NotNull(message = "支付单编号不能为空")
    private BigInteger id;

    @ApiModelProperty(value = "支付渠道", required = true, example = "wx_pub")
    @NotEmpty(message = "支付渠道不能为空")
    private String channelCode;

    @ApiModelProperty(value = "支付渠道的额外参数，例如说，微信公众号需要传递 openid 参数")
    private Map<String, String> channelExtras;

    @ApiModelProperty(value = "展示模式")
    private String displayMode;

    @ApiModelProperty(value = "应用编号", required = true, example = "1024")
    @NotNull(message = "应用编号不能为空")
    private BigInteger appId;

    @ApiModelProperty(value = "商户编号(应用下有多个商户情况下，必填)", example = "1668457081466269697")
    private BigInteger merchantId;

    @ApiModelProperty(value = "渠道编号", required = true, example = "1024")
    private Long channelId;

    @ApiModelProperty(value = "商家用戶id", example = "1024")
    private String appUserId;

    /**
     * 商户订单编号
     * 例如说，内部系统 A 的订单号。需要保证每个 PayMerchantDO 唯一
     */
    @ApiModelProperty(value = "商户订单编号", required = true, example = "1024")
    @NotEmpty(message = "商户订单编号不能为空")
    private String merchantOrderId;
    /**
     * 商品标题
     */
    @ApiModelProperty(value = "商品标题", required = true, example = "1024")
    @NotEmpty(message = "商品标题不能为空")
    private String subject;
    /**
     * 商品描述信息
     */
    @ApiModelProperty(value = "商品描述信息", required = true)
    @NotEmpty(message = "商品描述信息不能为空")
    private String body;
    /**
     * 异步通知地址
     */
    @ApiModelProperty(value = "异步通知地址",required = true, example = "1024")
    @NotEmpty(message = "异步通知地址不能为空")
    private String notifyUrl;


    /**
     * 支付金额，单位：分
     */
    @ApiModelProperty(value = "支付金额，单位：分",required = true, example = "1024")
    @NotNull(message = "支付金额不能为空")
    private Integer amount;

    /**
     * 购物卡支付金额，单位：分
     */
    @ApiModelProperty(value = "购物卡支付金额，单位：分")
    private Integer cardPayAmount;
    /**
     * 优惠金额，单位：分
     */
    @ApiModelProperty(value = "优惠金额，单位：分")
    private Integer couponAmount;

    /**
     * 用户 IP
     */
    @ApiModelProperty(value = "用户 IP",required = true, example = "127.0.0.1")
    @NotNull(message = "用户IP不能为空")
    private String userIp;

    @ApiModelProperty(value = "0:直销 5:分账(分账必填,否则走直销) 7:分账(内部订单)")
    private Integer orderType;

    @ApiModelProperty(value = "备注")
    private String remark;

}
